import {navBgImg} from '../../utils/imgUtils'
Component({
  properties:{
    title:{
     type:String,
     value:""
    },
    borderRadius:{
      type:Number,
      value:0
    },
    navTo:{
      type:String,
      value:""
    }

  },
  data:{
    navBgImg:navBgImg
  },
  methods:{
    back(){
      if(this.properties.navTo === ""){
        wx.navigateBack()
      }else{
        const exceList = ['/pages/my/my','/pages/index/index']
      const flag =  exceList.includes(this.properties.navTo)
      if(flag){
        wx.switchTab({
          url:this.properties.navTo
        })
      }else{
        wx.navigateTo({
          url:this.properties.navTo
        })
      }
   
      }
    }
  }
})